package com.benz.order.util.multithread;

public class ThreadSleep implements Runnable {
    @Override
    public void run() {
        for (int i = 0; i < 10; i++) {
            try {
                if(i==3){
                    Thread.sleep(3000);//sleep 2 s
                }else{
                    Thread.sleep(500);
                }
                System.out.println("thread 1 is outputting."+i);
            } catch (InterruptedException e) {
                throw new RuntimeException(e);
            }
        }
    }

}
